#44 new
shoaib iqbal

uninitialized constant PackagesController::RiCal

Reported by shoaib iqbal | February 29th, 2016 @ 07:46 AM

i am getting error while trying to create ics file please review my code whats wrong with this
uninitialized constant PackagesController::RiCal
is there need ti include or some thing else?

class PackagesController < ApplicationController
def i_cal pack = Administration::MerchantPackage.find(params[:id]) loc = pack.offering.merchant.address.to_s + pack.offering.merchant.city.to_s cal =RiCal.Calendar do event do description pack.subtitle dtstart DateTime.parse(pack.start_date.strftime('%m/%d/%Y %H:%M:%S')) dtend DateTime.parse(pack.end_date.strftime('%m/%d/%Y %H:%M:%S')) location loc add_attendee current_user.email rescue '' alarm do description "Segment 51" end end end respond_to do |format| format.ics { send_data(cal.export, :filename=>"Calendar.ics", :disposition=>"inline; filename=Calendar.ics", :type=>"text/calendar")} end end

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences

Shared Ticket Bins

People watching this ticket